package org.zyx.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.zyx.item.entity.Brand;
import org.zyx.yiyou.common.entity.PageResult;

import java.util.List;
import java.util.Map;

/**
 * @Author: SwordMaple
 * @Date: 2020/9/28  20:28
 * @Description: 搜索页面响应结果集
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
public class SearchResult extends PageResult<Goods> {
    private List<Map<String,Object>> categories;//分类集合
    private List<Brand> brands;//品牌结果集

    private List<Map<String,Object>> specs;//规格参数

    public SearchResult(List<Map<String, Object>> categories, List<Brand> brands) {
        this.categories = categories;
        this.brands = brands;
    }

    public SearchResult(Long total, Integer totalPage, List<Goods> items, List<Map<String, Object>> categories, List<Brand> brands,List<Map<String,Object>> specs) {
        super(total, totalPage, items);
        this.categories = categories;
        this.brands = brands;
        this.specs = specs;
    }

    public SearchResult(Long total, List<Goods> items, List<Map<String, Object>> categories, List<Brand> brands) {
        super(total, items);
        this.categories = categories;
        this.brands = brands;
    }
}
